/**
 * Created by freethy on 2017/10/29.
 * 首页获取消息通知
 */

require(["jquery"], function ($) {
    setInterval(function(){
        $.ajax({
            type: "get",
            url: "/admin/index/msg",
            success: function (data) {
                //console.log(data);
                $('span[class="msg-number"]').html(data);
                if(data != 0){
                    $('span[class="msg-number"]').show();
                }else{
                    $('span[class="msg-number"]').hide();
                }
            }
        });
    },5000);
});
